<template>
  <div id="pay_essay">
    <c-title :hide="false" text="已付费文章"></c-title>
    <div class="content">
      <van-pull-refresh v-model="isLoading" @refresh="loadTop">
        <div class="list" v-for="(item, index) in datas" :key="index" @click="toNoticeInfo(item)">
          <div class="left">
            <div class="title">{{ item.title }}</div>
            <div class="author">
              <span>{{ item.author }}</span>
              <span class="virtual-at">{{ item.virtual_at }}</span>
            </div>
          </div>
          <div class="image">
            <img :src="item.thumb" v-if="item.thumb" />
            <img src="../../assets/images/img_default.png" v-if="!item.thumb" />
          </div>
        </div>
      </van-pull-refresh>
    </div>
  </div>
</template>
<script>
import pay_essay_controller from './pay_essay_controller';
export default pay_essay_controller;
</script>
  <style lang="scss" rel="stylesheet/scss" scoped>
#pay_essay {

  padding-bottom: 2.5rem;
  .content {

    .list {
      margin: 0.625rem 0.75rem;
      background-color: #fff;
      padding:0.625rem;
      display: flex;
      border-radius: 0.5rem;
      box-sizing: border-box;

      .image {
        width: 6.125rem;
        height: auto;
        img {
          width: 100%;
          height: 100%;
          border-radius: 0.5rem;
        }
      }

      .left {
        flex: 1;
        display: flex;
        flex-direction: column;
        margin-right: 1rem;
        justify-content: space-between;

        .title {
          color: #00001C;
          text-align: left;
          font-size: 0.9375rem;
          font-weight: 500;
          overflow: hidden;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
        }
        .virtual-at{
          margin-left: 0.5625rem;
        }

        .author {
          margin-top: 0.5rem;
          display: flex;
          font-size: 0.6875rem;
          color: #AAAAB3;
          text-align: left;
          align-items: center;
          font-weight: 400;
        }
      }
    }
  }
}
</style>
